aux-image {
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
    position: relative;
}

aux-image img {
    opacity: 0;
}

aux-image .image {
    vertical-align: top;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

aux-image[mode=center] {
    .image {
        background-position: center;
    }
}

aux-image[mode=widthFix] {
    .image {
        display: none;
    }
    img {
        display: block;
        opacity: 1;
    }
}

aux-image:not([mode=widthFix]) {
    width: 170px;
    height: 170px;
}

aux-image[mode=center] {
    .image {

    }
}

aux-image .mask {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgb(242, 242, 242);
    z-index: 1;
    opacity: 1;
    transition: opacity 2s ease, z-index 0.1s ease 2s;
}

aux-image.loaded .mask {
    opacity: 0;
    z-index: -1;
}